package com.wgt.observer;

/**
 * Created by wgt on 2017/6/14.
 */
public class ObserverPattern {

    public static void main(String[] args) {

        Subject subject = new Subject();

        new BinaryObserver(subject);
        new OctalObserver(subject);
        new HexaObserver(subject);

        System.out.println("First state change: 15");
        subject.setStatus(15);
        System.out.println("Second state change: 10");
        subject.setStatus(10);
    }
}
